package com.link.play.fit.ai.bean

import java.io.Serializable

data class ServingTypeBean(
    var id: String = "",
    var formalName: String = "",
    var label: String = "", //按钮标签
    var metricAmount: Int = 0, //原始份量
    var metricUnit: String = "",//单位
    var numberOfUnits: Int = 0,
    var calories: Double = 0.0,
    var carbs: Double = 0.0,
    var protein: Double = 0.0,
    var fat: Double = 0.0,
    var saturatedFat: Double = 0.0,
    var polyUnsaturatedFat: Double = 0.0,
    var monoUnsaturatedFat: Double = 0.0,
    var cholesterol: Double = 0.0,
    var sodium: Double = 0.0,
    var fiber: Double = 0.0,
    var sugar: Double = 0.0,
    var potassium: Double = 0.0,
    var vitaminA: Double = 0.0,
    var vitaminC: Double = 0.0,
    var calcium: Double = 0.0,
    var iron: Double = 0.0
) : Serializable

//深复制
fun ServingTypeBean.deepCopy() = ServingTypeBean().apply {
    id = this@deepCopy.id
    formalName = this@deepCopy.formalName
    label = this@deepCopy.label
    metricAmount = this@deepCopy.metricAmount
    metricUnit = this@deepCopy.metricUnit
    numberOfUnits = this@deepCopy.numberOfUnits
    calories = this@deepCopy.calories
    carbs = this@deepCopy.carbs
    protein = this@deepCopy.protein
    fat = this@deepCopy.fat
    saturatedFat = this@deepCopy.saturatedFat
    polyUnsaturatedFat = this@deepCopy.polyUnsaturatedFat
    monoUnsaturatedFat = this@deepCopy.monoUnsaturatedFat
    cholesterol = this@deepCopy.cholesterol
    sodium = this@deepCopy.sodium
    fiber = this@deepCopy.fiber
    sugar = this@deepCopy.sugar
    potassium = this@deepCopy.potassium
    vitaminA = this@deepCopy.vitaminA
    vitaminC = this@deepCopy.vitaminC
    calcium = this@deepCopy.calcium
    iron = this@deepCopy.iron
}
